<template>
  <div style="padding-bottom: 50px">
<!--    头部-->
    <CenterHead></CenterHead>
<!--    我的订单-->
    <CenterGoodList v-if="$store.state.isLogin">
      我的订单
      <template v-slot:container>
        <MyGoods></MyGoods>
      </template>
    </CenterGoodList>
<!--    其他接口-->
    <CenterGoodList>
      Let's Play
      <template v-slot:container>
        <Games></Games>
      </template>
    </CenterGoodList>
<!--    去购物按钮-->
    <van-button to="/index" color="rgba(236, 13, 13, 1)" v-if="$store.state.isLogin">
      去购物
    </van-button>
    <van-button color="rgba(236, 13, 13, 1)" to="/accountsign" v-else>
      登录&nbsp;/&nbsp;注册
    </van-button>
  </div>
</template>

<script>
import CenterHead from "@/components/Mine/CenterHead";
import CenterGoodList from "@/components/Mine/CenterGoodList";
import MyGoods from "@/components/Mine/MyGoods";
import Games from "@/components/Mine/Games";

export default {
name: "Center",
  components:{
    CenterHead,
    CenterGoodList,
    MyGoods,
    Games,
  },
  created() {
  this.$store.commit('changeNav',4)
  }
}
</script>

<style scoped lang="less">
button{
  display: block;
  margin: 50px auto;
  width: 80%;
  height:40px;
  border-radius: 20px;
  line-height: 40px;
  font-size: 16px;
}
</style>